<template>
  <uni-list style="width: 100%;">
    <block v-for="(item, index) in retLogs" :key="index">
      <uni-list-item :title="item.createTime" :note="item.remarks" :rightText="item.ypRetPriceType==2?item.number+'条':item.weight+'斤'"></uni-list-item>
    </block>
  </uni-list>
</template>

<script>
	import {
		MyTip
	} from '@/components/ssty/common.js';
	import {
		queryRetLogs
	} from '@/api/fsh.js';
	
  export default {
    data() {
      return {
		  retLogs: []
      }
    },
	onLoad(options) {
		if(!options.odId && !options.deviceSn) {
			MyTip("参数无效");
			uni.navigateBack();
			return;
		}
		
		uni.showLoading({
			title: '正在查询中...'
		});
		
		// 根据订单或设备查询
		queryRetLogs(options.odId, options.deviceSn).then(res=>{
			console.log("queryRetLogs",res.entity)
			uni.hideLoading();
			this.retLogs = res.entity;
		}).catch(err => {
			console.log("fshRetLogs| queryRetLogs fail:%o", err);
			uni.hideLoading();
			MyTip(err.msg);
			uni.navigateBack();
		})
	},
    methods: {
      
    }
  }
</script>

<style>

</style>
